package com.ponhu.ea2.query;

import com.ponhu.ea2.support.validation.annotions.ValidateEnumValue;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * @author Wang
 * @date 2022/3/29 20:16
 */
 @Data
@Accessors(chain = true)
public class OrderModel implements Serializable {
    private static final long serialVersionUID = -293720989955250399L;

    @NotEmpty(message = "排序字段不能为空")
    @ValidateEnumValue(strValues = {"quality_value", "inventory_cost", "sale_tax_price", "total_real_stock_num", "create_time"}, message = "排序字段必须为指定值")
    @ApiModelProperty(value = "排序字段(成色:quality_value,货品成本:inventory_cost,货品售价:sale_tax_price,库存数量:total_real_stock_num,创建时间:create_time)")
    private String orderColumn;

    @NotEmpty(message = "排序规则不能为空")
    @ValidateEnumValue(strValues = {"asc", "desc"}, message = "排序规则必须为asc或desc")
    @ApiModelProperty("排序规则(升序：asc,降序：desc)")
    private String orderRegular;
}
